
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module Simulation</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>Simulation</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/Rakan/DjangoTrafficSimulation/TrafficSimulator/MapInterface/Simulation.py">/Users/Rakan/DjangoTrafficSimulation/TrafficSimulator/MapInterface/Simulation.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="simplejson.html">simplejson</a><br>
<a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="xml.dom.minidom.html">xml.dom.minidom</a><br>
<a href="sumolib.net.html">sumolib.net</a><br>
</td><td width="25%" valign=top><a href="string.html">string</a><br>
<a href="subprocess.html">subprocess</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="Simulation.html#GoogleSteps">GoogleSteps</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#SimConfig">SimConfig</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#XMLWriter">XMLWriter</a>
</font></dt><dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="Simulation.html#DataProcessor">DataProcessor</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#EdgeComputer">EdgeComputer</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#Flow">Flow</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#FlowCfg">FlowCfg</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#FlowFactory">FlowFactory</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#Point">Point</a>
</font></dt><dt><font face="helvetica, arial"><a href="Simulation.html#PointFactory">PointFactory</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="DataProcessor">class <strong>DataProcessor</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="DataProcessor-ConvertMap"><strong>ConvertMap</strong></a>(self)</dt></dl>

<dl><dt><a name="DataProcessor-DownloadMap"><strong>DownloadMap</strong></a>(self)</dt></dl>

<dl><dt><a name="DataProcessor-__init__"><strong>__init__</strong></a>(self, formData)</dt></dl>

<dl><dt><a name="DataProcessor-downloadGoogleSteps"><strong>downloadGoogleSteps</strong></a>(self)</dt></dl>

<dl><dt><a name="DataProcessor-getGoogleSteps"><strong>getGoogleSteps</strong></a>(self)</dt></dl>

<dl><dt><a name="DataProcessor-getSimInfo"><strong>getSimInfo</strong></a>(self)</dt></dl>

<dl><dt><a name="DataProcessor-makeFlowCfgs"><strong>makeFlowCfgs</strong></a>(self, flowCfgFactory)</dt></dl>

<dl><dt><a name="DataProcessor-readPoints"><strong>readPoints</strong></a>(self, data)</dt></dl>

<dl><dt><a name="DataProcessor-readValues"><strong>readValues</strong></a>(self, outputType, data)</dt></dl>

<dl><dt><a name="DataProcessor-writeLinks"><strong>writeLinks</strong></a>(self, top, right, bottom, left)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="EdgeComputer">class <strong>EdgeComputer</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="EdgeComputer-__init__"><strong>__init__</strong></a>(self, networkNodes, networkEdges)</dt></dl>

<dl><dt><a name="EdgeComputer-computeDestEdge"><strong>computeDestEdge</strong></a>()</dt></dl>

<dl><dt><a name="EdgeComputer-computeEdge"><strong>computeEdge</strong></a>(self, sourcePoint, firstHop)</dt></dl>

<dl><dt><a name="EdgeComputer-dist"><strong>dist</strong></a>(self, a, b)</dt><dd><tt>#Distance&nbsp;between&nbsp;two&nbsp;points&nbsp;a&nbsp;and&nbsp;b</tt></dd></dl>

<dl><dt><a name="EdgeComputer-dot"><strong>dot</strong></a>(self, s, d, p)</dt></dl>

<dl><dt><a name="EdgeComputer-getFlows"><strong>getFlows</strong></a>(self)</dt></dl>

<dl><dt><a name="EdgeComputer-getIds"><strong>getIds</strong></a>(self, edgeList)</dt></dl>

<dl><dt><a name="EdgeComputer-getNClosestNodes"><strong>getNClosestNodes</strong></a>(self, sourcePoint, N)</dt></dl>

<dl><dt><a name="EdgeComputer-pointFirstHopToEdge"><strong>pointFirstHopToEdge</strong></a>(self, source, firstHop)</dt></dl>

<dl><dt><a name="EdgeComputer-projectPointToEdge"><strong>projectPointToEdge</strong></a>(self, sourcePoint)</dt></dl>

<dl><dt><a name="EdgeComputer-sortByDist"><strong>sortByDist</strong></a>(self, dict)</dt></dl>

<dl><dt><a name="EdgeComputer-sortCoordFirst"><strong>sortCoordFirst</strong></a>(self, node)</dt></dl>

<dl><dt><a name="EdgeComputer-sortCoordSource"><strong>sortCoordSource</strong></a>(self, node)</dt></dl>

<dl><dt><a name="EdgeComputer-sortEq"><strong>sortEq</strong></a>(self, Eq)</dt></dl>

<dl><dt><a name="EdgeComputer-verifyFlow"><strong>verifyFlow</strong></a>()</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Flow">class <strong>Flow</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Flow-__init__"><strong>__init__</strong></a>(self, id, srcEdge, destEdge, rate, start, end)</dt></dl>

<dl><dt><a name="Flow-getDestEdge"><strong>getDestEdge</strong></a>()</dt></dl>

<dl><dt><a name="Flow-getEndTime"><strong>getEndTime</strong></a>()</dt></dl>

<dl><dt><a name="Flow-getId"><strong>getId</strong></a>()</dt></dl>

<dl><dt><a name="Flow-getRate"><strong>getRate</strong></a>()</dt></dl>

<dl><dt><a name="Flow-getSourceEdge"><strong>getSourceEdge</strong></a>()</dt></dl>

<dl><dt><a name="Flow-getStartTime"><strong>getStartTime</strong></a>()</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FlowCfg">class <strong>FlowCfg</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FlowCfg-__init__"><strong>__init__</strong></a>(self, src, fHop, lHop, dest, rate, start, end)</dt></dl>

<dl><dt><a name="FlowCfg-getDest"><strong>getDest</strong></a>(self)</dt></dl>

<dl><dt><a name="FlowCfg-getEndTime"><strong>getEndTime</strong></a>(self)</dt></dl>

<dl><dt><a name="FlowCfg-getFirstHop"><strong>getFirstHop</strong></a>(self)</dt></dl>

<dl><dt><a name="FlowCfg-getLastHop"><strong>getLastHop</strong></a>(self)</dt></dl>

<dl><dt><a name="FlowCfg-getRate"><strong>getRate</strong></a>(self)</dt></dl>

<dl><dt><a name="FlowCfg-getSource"><strong>getSource</strong></a>(self)</dt></dl>

<dl><dt><a name="FlowCfg-getStartTime"><strong>getStartTime</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FlowFactory">class <strong>FlowFactory</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FlowFactory-__init__"><strong>__init__</strong></a>(self, Network)</dt></dl>

<dl><dt><a name="FlowFactory-getFlowCfgs"><strong>getFlowCfgs</strong></a>(self)</dt></dl>

<dl><dt><a name="FlowFactory-makeFlows"><strong>makeFlows</strong></a>(self, type, simInfo, googleStepList)</dt></dl>

<dl><dt><a name="FlowFactory-newFlow"><strong>newFlow</strong></a>(self, srcEdge, destEdge, rate, startTime<font color="#909090">=None</font>, endTime<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="FlowFactory-newFlowCfg"><strong>newFlowCfg</strong></a>(self, source, firstHop, lastHop, destination, rate, startTime<font color="#909090">=None</font>, endTime<font color="#909090">=None</font>)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="GoogleSteps">class <strong>GoogleSteps</strong></a></font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="GoogleSteps-__init__"><strong>__init__</strong></a>(self, jsonFile)</dt></dl>

<dl><dt><a name="GoogleSteps-getFirstHop"><strong>getFirstHop</strong></a>(self)</dt></dl>

<dl><dt><a name="GoogleSteps-getSrc"><strong>getSrc</strong></a>(self)</dt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Point">class <strong>Point</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Point-__init__"><strong>__init__</strong></a>(self, projParam, netOffset, type, coord<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="Point-getOpen"><strong>getOpen</strong></a>(self)</dt></dl>

<dl><dt><a name="Point-getSumo"><strong>getSumo</strong></a>(self)</dt></dl>

<dl><dt><a name="Point-setOpen"><strong>setOpen</strong></a>(self, coord)</dt></dl>

<dl><dt><a name="Point-setSumo"><strong>setSumo</strong></a>(self, coord)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="PointFactory">class <strong>PointFactory</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PointFactory-__init__"><strong>__init__</strong></a>(self, projParam, netOffset)</dt></dl>

<dl><dt><a name="PointFactory-newPoint"><strong>newPoint</strong></a>(self, type, coord<font color="#909090">=None</font>)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SimConfig">class <strong>SimConfig</strong></a></font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SimConfig-__init__"><strong>__init__</strong></a>(self, formData)</dt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="XMLWriter">class <strong>XMLWriter</strong></a></font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="XMLWriter-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="XMLWriter-writeFlowDef"><strong>writeFlowDef</strong></a>(self, fileName, flowList)</dt></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>coord</strong> = (33.899884, 35.47468)<br>
<strong>myPoint</strong> = &lt;Simulation.Point object&gt;<br>
<strong>netOffset</strong> = (-728301.16, -3750839.32)<br>
<strong>pointFactory</strong> = &lt;Simulation.PointFactory object&gt;<br>
<strong>projParam</strong> = '+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'<br>
<strong>xOffset</strong> = -728301.16<br>
<strong>yOffset</strong> = -3750839.32</td></tr></table>
</body></html>